(1) Field of the Invention
This invention relates to a method of searching a matrix of binary data to find search regions in which long straight lines may be found, with the straight lines being those which are perpendicular to the original direction of scanning which produced the matrix of binary data.
(2) Description of the Related Art
There is a trend to process documents of various types by imaging the documents so as to obtain image data of the documents. For example, a document or item is moved past a scanning device (or a scanning device is moved over the item) to obtain image data of the item. The image data consists of a plurality of pixels or picture elements obtained at a scanning line associated with the scanning device. The pixels associated with successive scans obtained at the scanning line comprise the matrix of image data associated with the item or document. The image data is processed by conventional circuitry to eliminate "noise" and the like, and to also threshold the image data to produce a binary matrix of data. For example, each pixel of image data, which may comprise an eight bit gray scale value which is obtained from the scanning line, is reduced, by thresholding, to a binary "1" or a binary "0". A binary 1 may indicate the presence of data, while a binary 0 indicates the background or the absence of data. Thus, the image data about a document is thresholded to a matrix of binary data.
One of the problems with using a matrix of binary data is that it is often difficult to find what is looked for within the matrix. In other words, there may be a lot of extraneous binary data in the matrix in addition to what is sought. For example, one may look for certain lines in the matrix of data. In this regard, long lines which are parallel to the original direction of scanning are not difficult to find, whereas, long lines which are perpendicular to the original scan line are difficult to find. For example, if the scanning is done along successive columns, long lines which are parallel to the direction of scanning are easy to find. In other words, a long string of binary ones will be found in a particular column or adjacent columns, indicating the presence of a long line. However, if the long line is perpendicular to the original scanning direction, it means that a portion of the line will extend over many columns of data, making the search for this long line difficult.